package test.entity;

import java.util.jar.Attributes.Name;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Entity;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "person")
public class Person {

	
	private Integer id;
	private String name;
	private String phone;
	private String address;
	
	@Id
	@Column(name="id", nullable = false, unique = true)
	@GenericGenerator(name="generator", strategy = "uuid.hex")
	@GeneratedValue(generator = "generator")
	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "name", nullable = false)
	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "phone", nullable = false)
	public String getPhone() {
		return phone;
	}


	public void setPhone(String phone) {
		this.phone = phone;
	}

	@Column(name = "address", nullable = false)
	public String getAddress() {
		return address;
	}


	public void setAddress(String address) {
		this.address = address;
	}


	public Person() {
		// TODO Auto-generated constructor stub
	}

}
